{template 'common/header'}

<script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="./resource/js/lib/jquery-ui-1.10.3.min.js"></script>
<ul class="nav nav-tabs">
	<li {if $operation == 'display'}class="active"{/if}><a href="{php echo $this->createWebUrl('Manage', array('op' => 'display'))}">竞赛情况</a></li>
</ul>



<div class="main">
	<div class="panel panel-info">
	<div class="panel-heading">筛选</div>
	<div class="panel-body">
		<form action="./index.php" method="get" class="form-horizontal" role="form">
			<input type="hidden" name="c" value="site" />
			<input type="hidden" name="a" value="entry" />
			<input type="hidden" name="m" value="cgt_qyhb" />
			<input type="hidden" name="do" value="manage" />
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">关键字</label>
				<div class="col-xs-12 col-sm-8 col-lg-9">
					<input class="form-control" placeholder="输入名称" name="keyword" id="" type="text" value="{$_GPC['keyword']}">
				</div>
			</div>
			
			
			
			<div class="form-group">
			
				<div class=" col-xs-12 col-sm-2 col-lg-2">
					<button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
				</div>
			</div>
			<div class="form-group">
			</div>
		</form>
	</div>
</div>

	
<style>
.label{cursor:pointer;}
</style>
<div class="panel panel-default">
	<div class="panel-body table-responsive">
		<table class="table table-hover">
			<thead class="navbar-inner">
				<tr>

					<th style="width:10%;">昵称</th>
					<th style="width:5%;">头像</th>
					<th style="width:15%;">ip地址</th>
					<th style="width:20%;">红包金额</th>
					<th style="width:20%;">时间</th>
                    <th style="width:20%;">操作</th>
				</tr>
			</thead>
			<tbody>
				{loop $list $item}
				<tr>			
					<td>{$item['user_name']}</td>
	
					<td><img src="{$item['user_image']}" width=30/></td>
					<td>{$item['ipaddr']}</td>
					<td>{$item['num']}</td>

					<td title="{php echo date('Y-m-d H:i:s', $item['createtime'])}">{php echo date('Y-m-d H:i:s', $item['createtime'])}  </td>
				
<td>  <a href="{php echo $this->createWebUrl('manage', array('op' => 'delete', 'id' => $item['id']))}" onclick="return confirm('确认删除信息吗？');return false;">删除</a></td>				
				</tr>
				{/loop}
			</tbody>
		
		</table>
		{$pager}
	</div>
	</div>
</div>
<script type="text/javascript">
	require(['bootstrap'],function($){
		$('.btn').hover(function(){
			$(this).tooltip('show');
		},function(){
			$(this).tooltip('hide');
		});
	});


	function setProperty(obj,id,type){
		$(obj).html($(obj).html() + "...");
		$.post("{php echo $this->createWebUrl('setgoodsproperty')}"
			,{id:id,type:type, data: obj.getAttribute("data")}
			,function(d){
				$(obj).html($(obj).html().replace("...",""));
				if(type=='type'){
				 $(obj).html( d.data=='1'?'实体物品':'虚拟物品');
				}
				if(type=='status'){
				 $(obj).html( d.data=='1'?'上架':'下架');
				}
				$(obj).attr("data",d.data);
				if(d.result==1){
					$(obj).toggleClass("label-info");
				}
			}
			,"json"
		);
	}

</script>

{template 'common/footer'}
